The Principles of Beautiful Web Design by Jason Beaird

The Principles of Beautiful Web Design by Jason Beaird

Author:Jason Beaird
Language: eng
Format: mobi, epub, pdf
Publisher: SitePoint Pty Ltd
Published: 2010-08-16T04:00:00+00:00


Figure 3.22. Animal crackers with different background-position settings

To summarize all this information quickly, the developers of CSS have created a shorthand property, which allows us to specify all five of these properties in a single background declaration. It works like this:

element { background: background-color background-image background-repeat

↵background-position background-attachment; }

As an example, consider the following two rules that produce exactly the same output—a row of repeated animal crackers displayed on an orange background, along the bottom of a div with id="hihopickles":

#hihopickles {

background-color: #FF9900;

background-image: url('animalcracker.png');

background-repeat: repeat-x;

background-position: left bottom;

background-attachment: fixed;

}

#hihopickles {

background: #FF9900 url('animalcracker.png') repeat-x left bottom fixed;

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.